home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI O2 Out of Box Experience
/
SGI O2 Out of Box Experience.iso
/
cgi-bin
/
nph-startRegistration.cgi
< prev
next >
Wrap
Text File
|
1996-11-14
|
5KB
|
136 lines
#!/bin/sh
#**************************************************************************
#* *
#* Copyright (c) 1993 Silicon Graphics, Inc. *
#* All Rights Reserved *
#* *
#* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SGI *
#* *
#* The copyright notice above does not evidence any actual of intended *
#* publication of such source code, and is an unpublished work by Silicon *
#* Graphics, Inc. This material contains CONFIDENTIAL INFORMATION that is *
#* the property of Silicon Graphics, Inc. Any use, duplication or *
#* disclosure not specifically authorized by Silicon Graphics is strictly *
#* prohibited. *
#* *
#* RESTRICTED RIGHTS LEGEND: *
#* *
#* Use, duplication or disclosure by the Government is subject to *
#* restrictions as set forth in subdivision (c)(1)(ii) of the Rights in *
#* Technical Data and Computer Software clause at DFARS 52.227-7013, *
#* and/or in similar or successor clauses in the FAR, DOD or NASA FAR *
#* Supplement. Unpublished - rights reserved under the Copyright Laws of *
#* the United States. Contractor is SILICON GRAPHICS, INC., 2011 N. *
#* Shoreline Blvd., Mountain View, CA 94039-7311 *
#**************************************************************************
DISPLAY=:0.0
export DISPLAY
# First thing, check to see if we've already started Cust Reg
# If so, exit. If not, continue on.......
# Note that this is very specific, so if the calling string changes,
# we must change this conditional as well.
found=`/sbin/ps -ef | grep "Register_&_Win" | grep -v grep`
if [ -n "$found" ]; then
/usr/bin/X11/xconfirm -c -B "OK" -icon progress \
-font '-*-helvetica-medium-r-narrow--19-*-*-*-p-83-iso8859-1' \
-t "Customer Registration has already been started..." > /dev/null
exit
fi
server_protocol=$SERVER_PROTOCOL;
server_software=$SERVER_SOFTWARE;
/sbin/echo "$server_protocol 200 OK"
/sbin/echo "Server: $server_software"
/sbin/echo "Content-Type: text/html\n\n";
# Print header
/sbin/echo "<html>\n";
/sbin/echo "<body bgcolor=#000000 text=#996688>\n";
/sbin/echo "<PRE>\n";
/sbin/echo "</PRE>\n";
/sbin/echo "<h2> Starting EndUser Registration...</h2>\n";
/sbin/echo "<P>\n";
/sbin/echo " <FONT SIZE="3">It may take up to 30 seconds to start this tool.</FONT>\n";
/sbin/echo "<BR>\n";
/sbin/echo " <FONT SIZE="3">Please be patient.</FONT>\n";
/sbin/echo "</P>\n";
/sbin/echo "</body>\n";
/sbin/echo "</html>\n";
# Because we are starting from CGI, we need to reset the
# $HOME so that Netscape can find the preferences file and
# cache directory.
HOME=/tmp/.custreg; export HOME
TMPDIR=/tmp; export TMPDIR
if [ ! -d $HOME ]; then
/sbin/mkdir $HOME
fi
if [ ! -d $HOME/.netscape ]; then
/sbin/mkdir $HOME/.netscape
fi
if [ ! -d $HOME/.netscape/cache ]; then
/sbin/mkdir $HOME/.netscape/cache
fi
# Get OutOfBox's copy of the preferences file for us to use
/bin/cp /CDROM/misc/cgiPreferences $HOME/.netscape/preferences
/sbin/chown nobody.nobody $HOME/.netscape/preferences
# Get OutOfBox's plugin.list file - this cuts significant time off of startup
# Use OutOfBox's list becuase it will be current - it was just created...
/bin/cp /usr/people/OutOfBox/.netscape/plugin-list $HOME/.netscape/plugin-list
/sbin/chown nobody.nobody $HOME/.netscape/plugin-list
# Get the Xdefaults file so that the File->Exit menu is available
/bin/cp /CDROM/misc/cgiXdefaults $HOME/.Xdefaults
/sbin/chown nobody.nobody $HOME/.Xdefaults
# Before the user starts System Setup, get rid of the lock file so
# that we don't get an error next time we start. (Netscape only
# removes the lock when you quit via File->Exit.)
# The lock is actually a link, so we check for "-l"
if [ -l $HOME/.netscape/lock ]; then
/sbin/rm $HOME/.netscape/lock
fi
# Check to be sure that we have the correct Netscape version number
# in our preferences file; we don't want the customers to see
# the license agreement window...
/usr/people/OutOfBox/bin/netscapeVsn.pl nobody $HOME
# run app in background
`/var/www/htdocs/WhatsNew/CustReg/Register_\&_Win -oobe`;
# turn the secondary area black again.
/sbin/echo "<html>\n";
/sbin/echo "<body onLoad='self.location=\"file:/CDROM/entryspace/off.html\"'>\n";
/sbin/echo "</body>\n";
/sbin/echo "</html>\n";
# After the user quits Cust Reg, get rid of the temporary home directory
if [ -d $HOME ]; then
/bin/rm -rf $HOME
fi